package com.api.tournament.dao;

import com.api.common.mybatis.ResultMap;
import com.api.core.ApiMapper;
import com.api.tournament.model.Tournament;
import com.api.tournament.vo.TournamentListVo;
import com.api.tournament.vo.TournamentTeamUserVo;
import com.api.tournament.vo.TournamentUserListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface TournamentMapper extends ApiMapper<Tournament> {
    List<TournamentListVo> list(@Param("params")Map<String,Object> params , @Param("order")Map<String,Object> orderParams);

    List<TournamentListVo> organizationList(@Param("params") Map<String, Object> params,@Param("order") Map<String, Object> orderParams);

    Map<String, Object> organizationStatistics(@Param("params")Map<String, Object> params);

    ResultMap<String, Object> organizer(Long createUser);

    List<TournamentListVo> rewardList(Integer state, String hostName, @Param("order")Map<String, Object> orderParams);

    int countTop();

    ResultMap<String, Object> findIdentificationByUserType(Long userId, String student);

    List<Tournament> listByStatus(int status);

    List<TournamentTeamUserVo> joinUser(Long tournamentId);

    void reset(Long tournamentId);

    List<TournamentUserListVo> userList(@Param("params")Map<String,Object> params , @Param("order")Map<String,Object> orderParams);
}